package com.yuanshen.equip.enums;


import com.alibaba.excel.util.StringUtils;

/**
 * 英雄
 * 英雄英文名字连接 http://www.kpzs.com/news/40774.html
 *
 * @author Administrator
 * @date 2023/2/9 15:41
 */
public enum Hero {

    Albedo("阿贝多", "Albedo"),
    Aloy("埃洛伊", "Aloy"),
    Amber("安柏", "Amber"),
    Barbara("芭芭拉", "Barbara"),
    Bennett("班尼特", "Bennett"),
    Diluc("迪卢克", "Diluc"),
    Diona("迪奥娜", "Diona"),
    Eula("优菈", "Eula"),
    Fischl("菲谢尔", "Fischl"),
    Jean("琴", "Jean"),
    Kaeya("凯亚", "Kaeya"),
    Klee("可莉", "Klee"),
    Lisa("丽莎", "Lisa"),
    Mona("莫娜", "Mona"),
    Noelle("诺艾尔", "Noelle"),
    Razor("雷泽", "Razor"),
    Rosaria("罗莎莉亚", "Rosaria"),
    Sucrose("砂糖", "Sucrose"),
    Venti("温迪", "Venti"),
    Nilou("妮露", "Nilou"),
    Candace("坎蒂丝", "Candace"),

    Beidou("北斗", "Beidou"),
    Chongyun("重云", "Chongyun"),
    Ganyu("甘雨", "Ganyu"),
    HuTao("胡桃", "HuTao"),
    Keqing("刻晴", "Keqing"),
    Ningguang("凝光", "Ningguang"),
    Qiqi("七七", "Qiqi"),
    Shenhe("申鹤", "Shenhe"),
    Tartaglia("达达利亚", "Tartaglia"),
    Xiangling("香菱", "Xiangling"),
    Xiao("魈", "Xiao"),
    Xingqiu("行秋", "Xingqiu"),
    Xinyan("辛焱", "Xinyan"),
    Yanfei("烟绯", "Yanfei"),
    Yun_Jin("云堇", "Yun_Jin"),
    Zhongli("钟离", "Zhongli"),
    YeLan("夜兰", "YeLan"),
    Laiyila("莱依拉", "Laiyila"),
    Pingzang("鹿野院平藏", "Pingzang"),
    Wanderer("流浪者", "Wanderer"),
    Falushan("珐露珊", "Falushan"),
    Dori("多莉", "Dori"),
    Cyno("赛诺", "Cyno"),

    Arataki_Itto("荒泷一斗", "Arataki_Itto"),
    Gorou("五郎", "Gorou"),
    Kaedehara_Kazuha("枫原万叶", "Kaedehara_Kazuha"),
    Kamizato_Ayaka("神里绫华", "Kamizato_Ayaka"),
    Kamizato_Ayato("神里绫人", "Kamizato_Ayato"),
    Kujo_Sara("九条裟罗", "Kujo_Sara"),
    Raiden_Shogun("雷电将军", "Raiden_Shogun"),
    Sangonomiya_Kokomi("珊瑚宫心海", "Sangonomiya_Kokomi"),
    Sayu("早柚", "Sayu"),
    Thoma("托马", "Thoma"),
    Yae_Miko("八重神子", "Yae_Miko"),
    Kuki_Shinobu("久岐忍", "Kuki_Shinobu"),
    Yoimiya("宵宫", "Yoimiya");

    /**
     * 名字
     */
    private String name;

    /**
     * 代码
     */
    private String code;


    Hero(String name, String code) {
        this.name = name;
        this.code = code;
    }


    public String getName() {
        return this.name;
    }

    public String getCode() {
        return this.code;
    }

    /**
     * 解析
     *
     * @param code 代码
     * @return {@link PropertyType}
     */
    public static Hero parse(String code) {
        for (Hero item : Hero.values()) {
            if (StringUtils.equals(item.getCode(), code)) {
                return item;
            }
        }

        return null;
    }


    /**
     * 相等
     *
     * @param hero 装备类型
     * @return boolean
     */
    public boolean equal(Hero hero) {
        if (StringUtils.equals(name, hero.getName()) && StringUtils.equals(code, hero.getCode())) {
            return true;
        }

        return false;
    }
}
